//
//  NetworkTool.h
//  Wedding fantastic
//
//  Created by dllo on 15/6/29.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface NetworkTool : NSObject

typedef NS_ENUM(NSInteger, HTTPStyle) {
    HTTP,
    JSON,
    XML
};
typedef NS_ENUM(NSInteger, RequestBodyStyle) {
    BodyHTTP,
    BodyJSON
};

+ (void)get:(NSString *)url
       body:(id)body
 httpResult:(HTTPStyle)style
    success:(void(^)(id result))success
    failure:(void(^)(NSError *error))failure;

+ (void)post:(NSString *)url
        body:(id)body
  httpResult:(RequestBodyStyle)bodyStyle
 httpResult:(HTTPStyle)style
    success:(void(^)(id result))success
    failure:(void(^)(NSError *error))failure;

@end
